/* 隐藏页面的滚动条 */
body::-webkit-scrollbar {
  display: none;
}
body {
  -ms-overflow-style: none;
  overflow: -moz-scrollbars-none;
}
/* 定义全局 CSS 变量 */
:root {
  /* 语义化变量，可以帮助实现颜色方案。 */
  --primary: #10b981;
  --secondary: #96c24e;
  --accent: #f97316;
  --neutral: #64748b;
  --info: #3b82f6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #f43f5e;

  --base-100: #f3f4f6;
  --base-200: #d6d3d1;
  --base-300: #94a3b8;

  --text: #1f2623;
  --text-primary: #fbf2e3;
  --text-secondary: #d8f2ae;

  /* 通用提示组件变量 */
  --title-border-radius: 0.5rem;
  --title-background-color: var(--base-100);
  --title-color: var(--info);
  /* loading color */
  --loading-color: var(--primary);
}

/* 通用 CSS 提示组件 */
[data-title] {
  position: relative;
}
[data-title]::after {
  display: block;
  z-index: 99;
  position: absolute;
  bottom: 100%;
  left: -25%;
  padding: 0.35rem 0.75rem;
  overflow: hidden;
  transform: translate(0, -0.15rem);
  border-radius: var(--title-border-radius);
  background-color: var(--title-background-color);
  content: attr(data-title);
  color: var(--title-color);
  font-style: normal;
  font-size: 0.875rem;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
[data-title]::before {
  position: absolute;
  z-index: 90;
  content: "";
  border: 0.2rem solid var(--title-background-color);
  left: 1rem;
  transform: rotate(-45deg);
  bottom: 100%;
  opacity: 0;
}
[data-title]:hover::after,
[data-title]:hover::before {
  opacity: 1;
  transition: opacity 0.5s;
}
[data-title]:hover::before {
  transition-delay: 0.3s;
}

/* box background */
.z-bg-box {
  position: relative;
  padding: 2rem;
}
.z-bg-box::after,
.z-bg-box::before {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border-radius: 0.5rem;
  background-color: var(--accent);
  z-index: -20;
}
.z-bg-box::before {
  inset: 1rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: -10;
  transform: rotate(-3deg);
}
/* 支持响应式 */
@media (min-width: 768px) {
  .md\:z-bg-box {
    position: relative;
    padding: 2rem;
  }
  .md\:z-bg-box::after,
  .md\:z-bg-box::before {
    content: "";
    position: absolute;
    inset: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--base-100);
    z-index: -20;
  }
  .md\:z-bg-box::before {
    inset: 1rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: -10;
    transform: rotate(-3deg);
  }
}
@media (min-width: 1024px) {
  .lg\:z-bg-box {
    position: relative;
    padding: 2rem;
  }
  .lg\:z-bg-box::after,
  .lg\:z-bg-box::before {
    content: "";
    position: absolute;
    inset: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--base-100);
    z-index: -20;
  }
  .lg\:z-bg-box::before {
    inset: 1rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: -10;
    transform: rotate(-3deg);
  }
}
